//
// Created by baigui on 21-7-27.
//

#ifndef SIMPLE_PLAYER_DEMUX_H
#define SIMPLE_PLAYER_DEMUX_H


#include "mediaStream.h"
#include "basemoudle.h"

class MediaPlayer;
class MediaStream;

static int DEMUX_REQUEST_BUFFER = 1;
//static int START_REQUEST_BUFFER = 1;

class Demux : public BaseModule{

public:
    Demux(weak_ptr<MediaPlayer> player);

    ~Demux();

    virtual void requestbuffer();

    shared_ptr<MediaStream> getStreamInfo();

    void addStreamInfo(shared_ptr<MediaStream> stream);

private:
    shared_ptr<MediaStream> mMediaStream;
    sp_mutex_t spMutex;

};

#endif //SIMPLE_PLAYER_DEMUX_H
